﻿namespace MSSqlSchemaDoc.Core.DataStructures
{
    using System;
    using System.Collections.ObjectModel;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents documentation for a view.
    /// </summary>
    [Serializable()]
    public class ViewDocumentation : DocumentationObjectBase
    {
        /// <summary>
        /// Initializes a new instance of the ViewDocumentation class.
        /// </summary>
        public ViewDocumentation()
        {
            this.Columns = new Collection<ColumnDocumentation>();
            this.Indexes = new Collection<IndexDocumentation>();
        }

        /// <summary>
        /// Gets the view documentation object type string.
        /// </summary>
        public override DataStructureObjectType ObjectType
        {
            get
            {
                return DataStructureObjectType.ViewDocumentation;
            }
        }

        /// <summary>
        /// Gets or sets the column documentation.
        /// </summary>
        [XmlArray()]
        public Collection<ColumnDocumentation> Columns { get; set; }

        /// <summary>
        /// Gets or sets the documentation for the indexes.
        /// </summary>
        [XmlArray()]
        public Collection<IndexDocumentation> Indexes { get; set; }
    }
}
